@import "~pc/styles/lib_var.less";
@import "~pc/styles/lib_mixins.less";
@import "~pc/styles/lib_screen.less";

.noResult {
  font-size: 11px;
  padding: 0 10px;
  height: 30px;
  line-height: 30px;
  color: var(--fourthLevelText);
  width: 100%;
  text-align: center;
  display: inline-block;
}

.coverOption {
  display: flex;
  align-items: center;
  width: 100%;

  .optionIcon {
    display: flex;
    align-items: center;
    margin-right: 4px;
  }

  .coverOptionTitle {
    .ellipsis();
  }
}

.hideField {
  .light-scroll-bar();
  background: var(--highBg);
  width: 220px;
  overflow: auto;
  border-radius: 4px;
  box-shadow: var(--shadowCommonHighest);
  z-index: var(--viewSortBoxIndex);
  max-height: 500px;
  font-size: 13px;
  color: var(--firstLevelText);
  display: flex;
  flex-direction: column;
  cursor: default;
  padding: 16px 0 0;
  .noSelect();

  .header {
    padding: 0 16px 0 16px;

    .title {
      display: flex;
    }

    a {
      margin-left: 4px;
      display: flex;
      align-items: center;
    }

    .searchField {
      width: 188px;
      height: 30px;
      margin-top: 8px;
    }
  }

  .fields {
    .light-scroll-bar();
    overflow-y: scroll;
    overflow-x: hidden;
    max-height: calc(100% - 160px);
    padding: 0 12px 16px;
  }

  .coverSetting {
    display: flex;
    align-items: center;
    font-weight: normal;
    color: var(--textCommonPrimary);
    line-height: 18px;
    margin-bottom: 12px;


  }

  .opAll {
    display: flex;
    height: 30px;
    width: 188px;
    justify-content: space-between;
    margin: 0 auto 16px;
  }

  .hover {
    background: var(--rowSelectedBg);
    border-radius: 4px;
    position: relative;
    color: var(--textBrandDefault);

    .iconType {
      svg {
        fill: var(--textBrandDefault);
      }
    }
  }

  .hideFieldItem {
    display: flex;
    height: 35px;
    align-items: center;
    cursor: pointer;
    justify-content: space-between;
    padding: 0 4px;

    .fieldIconAndTitle {
      display: flex;
      align-items: center;
      flex: 1;
      margin-left: 4px;
    }

    @media (any-hover: hover) {
      &:hover {
        .hover();
      }
    }

    &:active {
      color: var(--textBrandActive);

      .iconType {
        svg {
          fill: var(--textBrandActive);
        }
      }
    }

    &:focus {
      .hover();
    }


    &:last-child {
      margin-bottom: 0;
    }

    .iconType {
      display: flex;
      align-items: center;
      margin-right: 4px;

    }

    .fieldName {
      flex: 1;
      width: 0;
      .ellipsis();
    }
  }

  .hideenFieldItemFocus {
    .hover();
  }
}

@media screen and (max-width: @w-md) {
  .hideField {
    width: 100%;
    height: 100%;
    max-height: none;
    overflow: hidden;

    background: none;
    box-shadow: none;
    padding-top: 0;

    .header {
      display: block;
      padding: 0;
      min-height: 48px;
      align-items: center;
      flex-wrap: wrap;

      .coverSetting {
        width: 100%;
        flex-shrink: 0;
        font-size: 14px;
      }

      .searchWrapper {
        width: 100%;
        padding: 8px 0;
        background: var(--defaultBg);
        flex-shrink: 0;

        .searchInput {
          padding: 0 16px;
          text-indent: 0;
        }

        .searchInput,
        .searchInput input {
          border-radius: 16px;
        }
      }
    }

    .fields {
      padding: 0 !important;
      flex: 1;
      max-height: none;
      min-height: 300px;
      overflow: auto;
    }

    .hideFieldItem {
      height: 48px;
      font-size: 14px;
      justify-content: unset;

      :global(.ant-switch) {
        min-width: 34px;
      }
    }

    .opAll {
      width: 100%;
      margin: 0;
      height: 48px;
      align-items: center;

      button {
        width: calc((100% - 24px) / 2);
        height: 40px !important;
        font-size: 14px;
      }
    }
  }

  .switchCoverFit {
    :global(.ant-switch) {
      min-width: 34px;
    }
  }
}

.switchCoverFit {
  display: flex;
  align-items: center;

  div[role='checkbox'] {
    border-color: var(--textCommonQuaternary);
  }
}


.label {
  color: var(--firstLevelText);
  display: flex;
  align-items: center;

  .tip {
    margin-left: 4px;
    display: flex;
    align-items: center;
  }
}
